<?php

namespace app\common\model;

class MallOrderRefund extends Base
{
    protected $deleteTime = 'delete_time';

    /**
     * @param string $order_id
     * @return MallOrderRefund|array|mixed|\think\Model|null
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function getOrderByOrderId(string $order_id = ''){
        return $this->where('order_id',$order_id)
            ->find();
    }

    /**
     * @return \think\model\relation\HasOne
     */
    public function mall_order(){
        return $this->hasOne(MallOrder::class,'order_sn','order_sn');
    }
}